{// 引入标签库 }
<tagLib name="html" />
<include file="Public:header" />
<div class="main">
<div class="main_title">{$vo.title}{%EDIT} <a href="{:u("Article/index")}" class="back_list">{%BACK_LIST}</a></div>
<div class="blank5"></div>
<form name="edit" action="__APP__" method="post" enctype="multipart/form-data" onsubmit="return check();">
<table class="form" cellpadding=0 cellspacing=0>
	<tr>
		<td colspan=2 class="topTd"></td>
	</tr>
	<tr>
		<td class="item_title">{%ARTICLE_TITLE}:</td>
		<td class="item_input"><input type="text" class="textbox require" name="title" value="{$vo.title}" /></td>
	</tr>
	<tr>
		<td class="item_title">{%SORT}:</td>
		<td class="item_input"><input type="text" class="textbox" name="sort" value="{$vo.sort}" /></td>
	</tr>
	<!--<tr>-->
		<!--<td class="item_title">标签:</td>-->
		<!--<td class="item_input"><input type="text" class="textbox" name="tags" style="width:500px;" value="{$vo.tags}" /> <span class='tip_span'>用空格分隔</span></td>-->
	<!--</tr>-->
	<tr>
		<td class="item_title">{%CATE_TREE}:</td>
		<td class="item_input">
		<select name="cate_id" class="require" id="cate_id">
			<option value="0">=={%NO_SELECT_CATE}==</option>
			<foreach name="cate_tree" item="cate_item">
				<option value="{$cate_item.id}"  rel="{$cate_item.type_id}" <if condition="$vo['cate_id'] eq $cate_item['id']">selected="selected"</if>>{$cate_item.title}</option>
			</foreach>
		</select>
		</td>
	</tr>
	<tr>
		<td class="item_title">{%IS_EFFECT}:</td>
		<td class="item_input">
			<lable>{%IS_EFFECT_1}<input type="radio" name="is_effect" value="1" <if condition="$vo['is_effect'] eq 1">checked="checked"</if> /></lable>
			<lable>{%IS_EFFECT_0}<input type="radio" name="is_effect" value="0" <if condition="$vo['is_effect'] eq 0">checked="checked"</if> /></lable>
		</td>
	</tr>
	<tr  id="general">
		<td class="item_title">{%ARTICLE_CONTENT}:</td>
		<td class="item_input">
			 <html:editor id="editor" name="content" type="KINDEDITOR" content="{$vo.content}" />
		</td>
	</tr>
    <tr id="notice">
        <td class="item_title">{%ARTICLE_CONTENT}:</td>
        <td class="item_input">
            <textarea cols="100" rows="10" name="content" id="content">{$vo.content}</textarea>
        </td>
    </tr>
	<tr>
		<td class="item_title"></td>
		<td class="item_input">
			<!--隐藏元素-->
			<input type="hidden" name="id" value="{$vo.id}" />
			<input type="hidden" name="{:conf("VAR_MODULE")}" value="Article" />
			<input type="hidden" name="{:conf("VAR_ACTION")}" value="update" />
			<!--隐藏元素-->
			<input type="submit" class="button" value="{%EDIT}" />
			<input type="reset" class="button" value="{%RESET}" />
		</td>
	</tr>
	<tr>
		<td colspan=2 class="bottomTd"></td>
	</tr>
</table>	 
</form>
    <script>
        $(function(){
            if($('#cate_id option:selected') .attr('rel')==2){
                $("#notice").show();
                $("#general").hide();
				$("#content").attr("name","content");
            }else{
                $("#notice").hide();
                $("#general").show();
				$("#content").attr("name","contents");
            }

            $("#cate_id").bind("click",function(){
                var cate_id=$('#cate_id option:selected') .attr('rel');
                if(cate_id==2){
                    $("#notice").show();
                    $("#general").hide();
					$("#content").attr("name","content");
                }else{
                    $("#notice").hide();
                    $("#general").show();
					$("#content").attr("name","contents");
                }
            });
        });
        function check(){
            if($('#cate_id option:selected') .attr('rel')==0){
                $("#notice").remove();
            }
            return true;
        }
    </script>
</div>
<include file="Public:footer" />